package com.pgybook.db.entity.mapper;

import org.springframework.stereotype.Repository;
import com.pgybook.db.entity.domain.StaffRoleEx;
import com.pgybook.db.entity.domain.StaffRoleKey;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

@Repository
public interface StaffRoleMapper {
    int countByExample(StaffRoleEx example);

    int deleteByExample(StaffRoleEx example);

    @Delete({
            "delete from staffrole",
            "where ROLE_ID = #{roleId,jdbcType=INTEGER}",
            "and STA_ID = #{staId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(StaffRoleKey key);

    @Insert({
            "insert into staffrole (ROLE_ID, STA_ID)",
            "values (#{roleId,jdbcType=INTEGER}, #{staId,jdbcType=INTEGER})"
    })
    int insert(StaffRoleKey record);

    int insertSelective(StaffRoleKey record);

    List<StaffRoleKey> selectByExample(StaffRoleEx example);

    int updateByExampleSelective(@Param("record") StaffRoleKey record, @Param("example") StaffRoleEx example);

    int updateByExample(@Param("record") StaffRoleKey record, @Param("example") StaffRoleEx example);
}
